<% layout('/layout/default.html', {title: '登录', libs: ['validate'], bodyClass: 'login-page'}){ %>
<% include('/include/upgrade.html'){} // 如果客户浏览器版本过低，则显示浏览器升级提示。 %>
	<!-- iCheck -->
	<link rel="stylesheet" href="${ctxPath}/static/icheck/1.0/square/blue.css">
	<link rel="stylesheet" href="${ctxPath}/static/jquery-toastr/toastr.min.css">
	<link rel="stylesheet" href="${ctxPath}/static/modules/sys/sysLogin.css">
	<link rel="stylesheet" href="${ctxPath}/static/jquery-validation/1.16/jquery.validate.css">
<% var productName = @Global.getProperty('productName'), productVersion = @Global.getProperty('version'); %>

<div class="login-box">
	<div class="login-logo" title="${productName}">
		<a href="${ctx}/login"><b>${productName}</b> <small>${productVersion}</small></a>
	</div>
	<div class="login-box-body">
				<!-- <p class="login-box-msg">Sign in to start your session</p> -->

				<form id="loginForm" action="${ctx}/login" method="post">
					<div class="form-group has-feedback">
					<span class="glyphicon glyphicon-user form-control-feedback" title="登录账号"></span>
						<input type="text" id="username" name="username" value=""
							class="form-control required" data-msg-required="请填写登录账号."
							placeholder="登录账号" /> 
					</div>

					<div class="form-group has-feedback">
						<span class="glyphicon glyphicon-lock form-control-feedback" title="登录密码，鼠标按下显示密码"
							onmousedown="$('#password').attr('type','text')"
							onmouseup="$('#password').attr('type','password')"></span>
						<input type="password" id="password" name="password" value=""
							class="form-control required" data-msg-required="请填写登录密码."
							placeholder="登录密码" autocomplete="off" /> 
					</div>
					
					<!-- <% if(isValidateCodeLogin) {%>   <% } %> -->
					<div class="form-group has-feedback" id="isValidCodeLogin" style="display:${isValidateCodeLogin?'blank':'none'}">
						<#form:validcode name="validateCode" />
					</div>

					<div class="form-group">
						<div class="checkbox icheck">
							<label title="公共场所慎用,下次不需要再填写帐号"> <input type="checkbox"
								name="rememberUserCode" class="form-control"
								data-style="square-blue">&nbsp; 记住账号
							</label> &nbsp; 
							
							<label title="公共场所慎用,下次不需要再填写帐号和密码"> <input
								type="checkbox" name="rememberMe" class="form-control"
								data-style="square-blue">&nbsp; 记住密码
							</label>
						</div>
					</div>
					<!-- /.col -->
					<div class="form-group">
						<!-- <button type="submit" class="btn btn-primary btn-block btn-flat">Sign In</button> -->
						<button type="submit" class="btn btn-primary btn-block btn-flat"
							id="btnSubmit" data-loading="登录验证成功，正在进入..."
							data-login-valid="正在验证登录，请稍后...">立即登录</button>

					</div>
					<!-- /.col -->
				</form>

				<!--     <div class="social-auth-links text-center">
	      <p>- OR -</p>
	      <a href="#" class="btn btn-block btn-social btn-facebook btn-flat"><i class="fa fa-facebook"></i> Sign in using
	        Facebook</a>
	      <a href="#" class="btn btn-block btn-social btn-google btn-flat"><i class="fa fa-google-plus"></i> Sign in using
	        Google+</a>
	    </div>
	 -->
				<!-- /.social-auth-links -->

				<a href="#">忘记密码</a><br>
				<!-- <a href="register.html" class="text-center">Register a new membership</a> -->

			</div>
	<div class="login-copyright">
		&copy; ${@DateUtils.getYear()} ${productName} - Powered By <a href="http://jsite.org.cn">jsite.org.cn</a>.
	</div>
</div>

<% } %>

<script src="${ctxPath}/static/jquery-toastr/toastr.min.js"></script>
<script src="${ctxPath}/static/icheck/1.0/icheck.min.js"></script>
<script src="${ctxPath}/static/modules/sys/sysLogin.js"></script>
